﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage_User.master" AutoEventWireup="true" CodeFile="DangKy.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table class="style1" style="width: 600px; font-size: 18px; font-weight: bold;">
        <tr>
            <td align="center" class="style2" colspan="2" 
                    style="font-size: 20px; font-weight: bold; color: #000080; height: 27px; background-color: #999966;">
                    ĐĂNG KÝ 
            </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    &nbsp;</td>
            <td align="left">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                
                                        </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    &nbsp;</td>
            <td align="left">
                <asp:Label ID="Label1" runat="server"></asp:Label>
                
                                        </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Họ tên:</td>
            <td align="left">
                <asp:TextBox ID="TextBox1" runat="server" Width="300px"></asp:TextBox>
                    &nbsp;&nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                    runat="server" ControlToValidate="TextBox1" 
                    ErrorMessage="Họ tên khong duoc rong">*</asp:RequiredFieldValidator>
                
                                        </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Tên đăng ký:</td>
            <td align="left">
                <asp:TextBox ID="TextBox2" runat="server" Width="300px"></asp:TextBox>
                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" 
                    runat="server" ControlToValidate="TextBox2" 
                    ErrorMessage="Ten đăng ký khong duoc rong">*</asp:RequiredFieldValidator>
                
                                        <asp:CustomValidator ID="CustomValidator1" 
                    runat="server" ControlToValidate="TextBox1" Display="Dynamic" 
                    ErrorMessage="Tên đã tồn tại" 
                    onservervalidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
                
                                        </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Mật khẩu :
                </td>
            <td align="left">
                <asp:TextBox ID="TextBox3" runat="server" TextMode="Password" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="TextBox3" ErrorMessage="Mat khau khong duoc rong">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px; height: 30px;">
                    Nhập lại mật khẩu :
                </td>
            <td align="left" style="height: 30px">
                <asp:TextBox ID="TextBox4" runat="server" TextMode="Password" Width="300px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ControlToValidate="TextBox4" 
                    ErrorMessage="Mat khau nhap lai khong duoc rong">*</asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                    ControlToCompare="TextBox3" ControlToValidate="TextBox4" Display="Dynamic" 
                    ErrorMessage="Nhap lai khong trung">*</asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Giới tính:</td>
            <td align="left">
                <asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="24px" 
                    Width="83px">
                    <asp:ListItem Value="True">Nam</asp:ListItem>
                    <asp:ListItem Value="False">Nữ</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Ngày sinh:</td>
            <td align="left">
                <asp:TextBox ID="TextBox10" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                    ControlToValidate="TextBox10" ErrorMessage="Ngày sinh không được rỗng">*</asp:RequiredFieldValidator>
                                        </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Địa chỉ:</td>
            <td align="left">
                <asp:TextBox ID="TextBox11" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                    ControlToValidate="TextBox11" ErrorMessage="Vui long nhap vao dia chi">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Email:</td>
            <td align="left">
                <asp:TextBox ID="TextBox5" runat="server" Width="293px"></asp:TextBox>
                    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator5" 
                    runat="server" ControlToValidate="TextBox5" 
                    ErrorMessage="Ban chua nhap Email">*</asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="TextBox5" ErrorMessage="Email khong hop le" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                                        </td>
        </tr>
        <tr>
            <td align="left" class="style2" style="width: 164px">
                    Điện thoại:</td>
            <td align="left">
                <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                    ControlToValidate="TextBox7" ErrorMessage="Không phải số thoại thoại" 
                    ValidationExpression="\d{1,15}">*</asp:RegularExpressionValidator>
            </td>
                                    </tr>
        <tr>
            <td class="style2" style="width: 164px">
                    &nbsp;</td>
            <td align="left">
                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Đăng ký" 
                        Width="85px" style="height: 26px" />
                <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Hủy" />
            </td>
        </tr>
        </table>
</asp:Content>

